<template>
  <div>
    <template v-if="$slots.default">
      <div class="fullscreen_default" :style="getStyle()">
        <slot></slot>
      </div>
    </template>
    <template v-if="$slots.mask">
      <div class="fullscreen_mask">
        <div class="fullscreen_close" @click="emit('close')">
          <img src="@/assets/img/close.svg" alt="" />
        </div>
        <slot name="mask"></slot>
      </div>
    </template>
  </div>
</template>
<script setup>
import { useAttrs } from "vue";
const attrs = useAttrs();
const getStyle = () => {
  return attrs;
};
const emit = defineEmits(["close"]);
</script>
<style lang="scss">
.fullscreen_mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: #7f7f7f;
  z-index: 2025;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  .fullscreen_close {
    width: 40px;
    height: 40px;
    position: absolute;
    right: 16px;
    top: 16px;
    background-color: rgb(89, 89, 89);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
  }
}
</style>
